<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<%@ taglib prefix="t" tagdir="/WEB-INF/tags" %>
<%@ taglib prefix="form" uri="http://www.springframework.org/tags/form" %>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>

<t:layout title="Step 3 - Instasale">
    <div class="row">
        <div class="span6 offset3">
            <jsp:include page="/views/car.jsp"/>
            <form:form commandName="car" action="/cars/saveCar.html">
                <form:hidden path="model"/>
                <form:hidden path="description"/>
                <form:hidden path="price"/>
                <form:hidden path="engineType"/>
                <form:hidden path="seller"/>
                <form:hidden path="availableDate"/>
                <c:forEach var="feature" items="${car.features}">
                    <input id="features" name="features" value="${feature.id}" type="hidden"/>
                </c:forEach>
                <form:hidden path="used"/>
                <form:hidden path="mileage"/>
                <input type="submit"
                       value="Save" class="btn btn-success"/>
                <a href="/cars/" class="btn btn-danger">Cancel</a>
            </form:form>
        </div>
    </div>
</t:layout>